package com.zeng.jiudian.servlet;

import com.alibaba.fastjson.JSONObject;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author JJ_yo
 * @Date 2020/7/30 - 9:27
 */
@WebServlet("/exitManage")
public class ExitManageServlet extends HttpServlet
{
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
    {
        req.getSession().setAttribute("username", null);

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("exit", 1);
        resp.getWriter().println(jsonObject);
    }
}
